<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Skilful: Исходный файл Skilful/Data/Model.cs</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javaScript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Создано системой Doxygen 1.7.1 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Поиск');
--></script>
<div class="navigation" id="top">
  <div class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Титульная&nbsp;страница</span></a></li>
      <li><a href="namespaces.html"><span>Пакеты</span></a></li>
      <li><a href="annotated.html"><span>Классы</span></a></li>
      <li class="current"><a href="files.html"><span>Файлы</span></a></li>
      <li><a href="dirs.html"><span>Алфавитный&nbsp;указатель&nbsp;директорий</span></a></li>
      <li id="searchli">
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Поиск" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>Файлы</span></a></li>
    </ul>
  </div>
  <div class="navpath">
    <ul>
      <li><a class="el" href="dir_7adcdc1edff7620168fbc20357cad448.html">Skilful</a>      </li>
      <li><a class="el" href="dir_c777626736fbbff11bce263deda591b3.html">Data</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<h1>Model.cs</h1>  </div>
</div>
<div class="contents">
<a href="_model_8cs.html">См. документацию.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 ﻿<span class="comment">//---------------------------------------------------------------------------------------------------------------</span>
<a name="l00002"></a>00002 <span class="comment">// Skilful. Tactica Adversa graphic and analysis tool.</span>
<a name="l00003"></a>00003 <span class="comment">// Copyright (C) 2010 &quot;...&quot;, Alex Kokomov(Loylick)</span>
<a name="l00004"></a>00004 <span class="comment">//</span>
<a name="l00005"></a>00005 <span class="comment">// This program is free software; you can redistribute it and/or</span>
<a name="l00006"></a>00006 <span class="comment">// modify it under the terms of the GNU General Public License</span>
<a name="l00007"></a>00007 <span class="comment">// as published by the Free Software Foundation; either version 2</span>
<a name="l00008"></a>00008 <span class="comment">// of the License, or (at your option) any later version.</span>
<a name="l00009"></a>00009 <span class="comment">//</span>
<a name="l00010"></a>00010 <span class="comment">// This program is distributed in the hope that it will be useful,</span>
<a name="l00011"></a>00011 <span class="comment">// but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00012"></a>00012 <span class="comment">// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span>
<a name="l00013"></a>00013 <span class="comment">// GNU General Public License for more details.</span>
<a name="l00014"></a>00014 <span class="comment">//</span>
<a name="l00015"></a>00015 <span class="comment">// You should have received a copy of the GNU General Public License</span>
<a name="l00016"></a>00016 <span class="comment">// along with this program; if not, write to the Free Software</span>
<a name="l00017"></a>00017 <span class="comment">// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.</span>
<a name="l00018"></a>00018 <span class="comment">//</span>
<a name="l00019"></a>00019 <span class="comment">// mail: support@protoforma.com </span>
<a name="l00020"></a>00020 <span class="comment">//---------------------------------------------------------------------------------------------------------------</span>
<a name="l00021"></a>00021 
<a name="l00022"></a>00022 <span class="keyword">using</span> System;
<a name="l00023"></a>00023 <span class="keyword">using</span> System.Collections.Generic;
<a name="l00024"></a>00024 <span class="keyword">using</span> System.Drawing;
<a name="l00025"></a>00025 <span class="keyword">using</span> System.Text;
<a name="l00026"></a>00026 <span class="keyword">using</span> Skilful.QuotesManager;
<a name="l00027"></a>00027 
<a name="l00028"></a>00028 
<a name="l00029"></a>00029 <span class="keyword">namespace </span>ChartV2
<a name="l00030"></a>00030 {
<a name="l00031"></a><a class="code" href="namespace_chart_v2.html#ad32c7a3681414adea76a8836845216da">00031</a>     <span class="keyword">public</span> <span class="keyword">enum</span> <a class="code" href="namespace_chart_v2.html#ad32c7a3681414adea76a8836845216da">ModelType</a> { MP, ATR, MDR };
<a name="l00032"></a>00032 
<a name="l00033"></a><a class="code" href="class_chart_v2_1_1_h_target_line.html">00033</a>     <span class="keyword">public</span> <span class="keyword">class </span><a class="code" href="class_chart_v2_1_1_h_target_line.html">HTargetLine</a>
<a name="l00034"></a>00034     {
<a name="l00035"></a><a class="code" href="class_chart_v2_1_1_h_target_line.html#a37fec2c33252f1021941963520c87d6d">00035</a>         <span class="keyword">public</span> PointF[] <a class="code" href="class_chart_v2_1_1_h_target_line.html#a37fec2c33252f1021941963520c87d6d">PointsForDrawing_I_F</a> = <span class="keyword">new</span> PointF[2];
<a name="l00036"></a><a class="code" href="class_chart_v2_1_1_h_target_line.html#a32dc708f854d235c303d9a7e91c4d407">00036</a>         <span class="keyword">public</span> PointF[] <a class="code" href="class_chart_v2_1_1_h_target_line.html#a32dc708f854d235c303d9a7e91c4d407">PointsForDrawing_I_E</a> = <span class="keyword">new</span> PointF[2];
<a name="l00037"></a><a class="code" href="class_chart_v2_1_1_h_target_line.html#aed8c082a17c1217b7a1b1aa7b92703dd">00037</a>         <span class="keyword">public</span> <span class="keywordtype">int</span> <a class="code" href="class_chart_v2_1_1_h_target_line.html#aed8c082a17c1217b7a1b1aa7b92703dd">SelectedCount</a> = 0;  <span class="comment">//количество выделенных моделей к которым прикреплена данная ГЦ</span>
<a name="l00038"></a><a class="code" href="class_chart_v2_1_1_h_target_line.html#a8edf31c853121def8a9e48aa26a9f325">00038</a>         <span class="keyword">public</span> <span class="keywordtype">bool</span> <a class="code" href="class_chart_v2_1_1_h_target_line.html#a8edf31c853121def8a9e48aa26a9f325">IsVisible</a> = <span class="keyword">true</span>;
<a name="l00039"></a><a class="code" href="class_chart_v2_1_1_h_target_line.html#a83b5dada236f11bf830c42e27d40293a">00039</a>         <span class="keyword">public</span> <a class="code" href="class_chart_v2_1_1_h_target_line.html#a83b5dada236f11bf830c42e27d40293a">HTargetLine</a>(Skilful.ModelManager.THTangentLine TH)
<a name="l00040"></a>00040         {
<a name="l00041"></a>00041 
<a name="l00042"></a>00042             Skilful.ModelManager.TLine TargetLine = Skilful.ModelManager.Common.CalcLine(TH.PointI, TH.PointF);
<a name="l00043"></a>00043             <a class="code" href="class_chart_v2_1_1_h_target_line.html#a37fec2c33252f1021941963520c87d6d">PointsForDrawing_I_F</a>[0].X = (float) (7*(TH.PointF.Bar - TH.PointI.Bar) + TH.PointF.Bar);
<a name="l00044"></a>00044             <a class="code" href="class_chart_v2_1_1_h_target_line.html#a37fec2c33252f1021941963520c87d6d">PointsForDrawing_I_F</a>[0].Y = (float) Skilful.ModelManager.Common.CalcLineValue(TargetLine, <a class="code" href="class_chart_v2_1_1_h_target_line.html#a37fec2c33252f1021941963520c87d6d">PointsForDrawing_I_F</a>[0].X);
<a name="l00045"></a>00045             <a class="code" href="class_chart_v2_1_1_h_target_line.html#a37fec2c33252f1021941963520c87d6d">PointsForDrawing_I_F</a>[1] = TH.PointI.pt;
<a name="l00046"></a>00046             <a class="code" href="class_chart_v2_1_1_h_target_line.html#a32dc708f854d235c303d9a7e91c4d407">PointsForDrawing_I_E</a>[0] = TH.PointE.pt;
<a name="l00047"></a>00047             <a class="code" href="class_chart_v2_1_1_h_target_line.html#a32dc708f854d235c303d9a7e91c4d407">PointsForDrawing_I_E</a>[1] = TH.PointI.pt;
<a name="l00048"></a>00048 
<a name="l00049"></a>00049 
<a name="l00050"></a>00050         }
<a name="l00051"></a>00051     }
<a name="l00052"></a>00052 
<a name="l00053"></a><a class="code" href="class_chart_v2_1_1_model.html">00053</a>     <span class="keyword">public</span> <span class="keyword">class </span><a class="code" href="class_chart_v2_1_1_model.html">Model</a>
<a name="l00054"></a>00054     {
<a name="l00055"></a>00055         <span class="comment">//индекс ГЦ соответствующей данной модели</span>
<a name="l00056"></a><a class="code" href="class_chart_v2_1_1_model.html#ac5004f61ad74367457e94506bac1b70d">00056</a>         <span class="keyword">public</span> <span class="keywordtype">int</span> <a class="code" href="class_chart_v2_1_1_model.html#ac5004f61ad74367457e94506bac1b70d">HTi</a> = -1;
<a name="l00057"></a>00057 
<a name="l00058"></a><a class="code" href="class_chart_v2_1_1_model.html#abf28b47a9d732fcf266868d97ff5c96f">00058</a>         <span class="keyword">public</span> Skilful.QuotesManager.TF <a class="code" href="class_chart_v2_1_1_model.html#abf28b47a9d732fcf266868d97ff5c96f">TimeFrame</a>;
<a name="l00059"></a>00059         <span class="comment">//Точки для уже протянутых на нужную длинну линий. т.е. </span>
<a name="l00060"></a>00060         <span class="comment">//Данные точки не относятся к реальному положению вещей</span>
<a name="l00061"></a><a class="code" href="class_chart_v2_1_1_model.html#a25b71ec0221286c39d0b7a94ce117af7">00061</a>         <span class="keyword">public</span> PointF[] <a class="code" href="class_chart_v2_1_1_model.html#a25b71ec0221286c39d0b7a94ce117af7">PointsForDrawing_1_3</a> = <span class="keyword">new</span> PointF[2];
<a name="l00062"></a><a class="code" href="class_chart_v2_1_1_model.html#a108a52b513189d4be97cd52fc07139bc">00062</a>         <span class="keyword">public</span> PointF[] <a class="code" href="class_chart_v2_1_1_model.html#a108a52b513189d4be97cd52fc07139bc">PointsForDrawing_2_4</a> = <span class="keyword">new</span> PointF[2];
<a name="l00063"></a><a class="code" href="class_chart_v2_1_1_model.html#a830db3a2fc646531020e97e4b884b07b">00063</a>         <span class="keyword">public</span> PointF[] <a class="code" href="class_chart_v2_1_1_model.html#a830db3a2fc646531020e97e4b884b07b">PointsForDrawing_21_4</a> = <span class="keyword">new</span> PointF[2];
<a name="l00064"></a><a class="code" href="class_chart_v2_1_1_model.html#ab5929207be733e7fae17a12c2f1a63d0">00064</a>         <span class="keyword">public</span> PointF[] <a class="code" href="class_chart_v2_1_1_model.html#ab5929207be733e7fae17a12c2f1a63d0">PointsForDrawing_211_4</a> = <span class="keyword">new</span> PointF[2];
<a name="l00065"></a><a class="code" href="class_chart_v2_1_1_model.html#a1c288f038b25eae0cf5d570c02a819f9">00065</a>         <span class="keyword">public</span> PointF[] <a class="code" href="class_chart_v2_1_1_model.html#a1c288f038b25eae0cf5d570c02a819f9">PointsForDrawing_3_5</a> = <span class="keyword">new</span> PointF[2];
<a name="l00066"></a><a class="code" href="class_chart_v2_1_1_model.html#a1dd889802f9bbe5885fe091cbb84f378">00066</a>         <span class="keyword">public</span> PointF[] <a class="code" href="class_chart_v2_1_1_model.html#a1dd889802f9bbe5885fe091cbb84f378">PointsForDrawing_31_5</a> = <span class="keyword">new</span> PointF[2];
<a name="l00067"></a><a class="code" href="class_chart_v2_1_1_model.html#a7fbd093fe5537e55564ac99c9dced4f0">00067</a>         <span class="keyword">public</span> PointF[] <a class="code" href="class_chart_v2_1_1_model.html#a7fbd093fe5537e55564ac99c9dced4f0" title="Дальние HP, через т2 и т2&amp;#39;&amp;#39;.">FarPoint6</a> = <span class="keyword">new</span> PointF[3];  
<a name="l00068"></a>00068 
<a name="l00069"></a><a class="code" href="class_chart_v2_1_1_model.html#a566a6daa32a5614819a1ac69fdad736e">00069</a>         <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">int</span>? <a class="code" href="class_chart_v2_1_1_model.html#a566a6daa32a5614819a1ac69fdad736e">lastSelectedModelIndex</a> = null;
<a name="l00070"></a><a class="code" href="class_chart_v2_1_1_model.html#a55f1f2ab454e6bb34260f06da9aff66b">00070</a>         <span class="keyword">public</span> <span class="keyword">static</span> List&lt;int&gt; <a class="code" href="class_chart_v2_1_1_model.html#a55f1f2ab454e6bb34260f06da9aff66b">selectedModelIndexes</a> = <span class="keyword">new</span> List&lt;int&gt;();
<a name="l00071"></a>00071         <span class="comment">//четыре временных переменных для функции</span>
<a name="l00072"></a>00072         <span class="comment">//выделения моделей (чтобы не запрашивать память на каждую модель)</span>
<a name="l00073"></a>00073         <span class="keyword">private</span> <span class="keywordtype">int</span> X1;
<a name="l00074"></a>00074         <span class="keyword">private</span> <span class="keywordtype">int</span> X2;
<a name="l00075"></a>00075         <span class="keyword">private</span> <span class="keywordtype">int</span> Y1;
<a name="l00076"></a>00076         <span class="keyword">private</span> <span class="keywordtype">int</span> Y2;
<a name="l00077"></a>00077 
<a name="l00078"></a>00078 
<a name="l00079"></a><a class="code" href="class_chart_v2_1_1_model.html#ab93e9f8df46cc93f14e69be91d8d5979">00079</a>         <span class="keyword">public</span> PointF[] <a class="code" href="class_chart_v2_1_1_model.html#ab93e9f8df46cc93f14e69be91d8d5979">CT_4</a> = <span class="keyword">new</span> PointF[3];
<a name="l00080"></a><a class="code" href="class_chart_v2_1_1_model.html#a09db15d16d27e923f44be5205b192ecb">00080</a>         <span class="keyword">public</span> <span class="keywordtype">int</span> <a class="code" href="class_chart_v2_1_1_model.html#a09db15d16d27e923f44be5205b192ecb">LifeTime</a>;
<a name="l00081"></a><a class="code" href="class_chart_v2_1_1_model.html#a64e549ed71451bb2031477c7d01b49ee">00081</a>         <span class="keyword">public</span> PointF[] <a class="code" href="class_chart_v2_1_1_model.html#a64e549ed71451bb2031477c7d01b49ee">_100Percent</a> = <span class="keyword">new</span> PointF[2];
<a name="l00082"></a>00082         <span class="comment">//public PointF CT1;</span>
<a name="l00083"></a>00083         <span class="comment">//public PointF _1;</span>
<a name="l00084"></a>00084         <span class="comment">//public PointF _2;</span>
<a name="l00085"></a>00085         
<a name="l00086"></a><a class="code" href="class_chart_v2_1_1_model.html#a5d6c3c4018a6c361c15fef5600d7cc5a">00086</a>         <span class="keyword">public</span> PointF[] <a class="code" href="class_chart_v2_1_1_model.html#a5d6c3c4018a6c361c15fef5600d7cc5a">_211</a> = <span class="keyword">new</span> PointF[3];
<a name="l00087"></a>00087         <span class="comment">//public PointF _3;</span>
<a name="l00088"></a><a class="code" href="class_chart_v2_1_1_model.html#a90419a37bb64253c3f02d83bb05d842c">00088</a>         <span class="keyword">public</span> PointF <a class="code" href="class_chart_v2_1_1_model.html#a90419a37bb64253c3f02d83bb05d842c">_31</a>;
<a name="l00089"></a>00089         <span class="comment">//public PointF _4;</span>
<a name="l00090"></a>00090         <span class="comment">//public PointF _5;</span>
<a name="l00091"></a><a class="code" href="class_chart_v2_1_1_model.html#a81b13a79a35fb94055aa7bcc10c0abeb">00091</a>         <span class="keyword">public</span> PointF <a class="code" href="class_chart_v2_1_1_model.html#a81b13a79a35fb94055aa7bcc10c0abeb">_6</a>;
<a name="l00092"></a>00092         <span class="comment">//public PointF _61;</span>
<a name="l00093"></a>00093 
<a name="l00094"></a>00094 
<a name="l00095"></a><a class="code" href="class_chart_v2_1_1_model.html#a855b270a41ae713519f686dc0125f312">00095</a>         <span class="keyword">public</span> PointF[] <a class="code" href="class_chart_v2_1_1_model.html#a855b270a41ae713519f686dc0125f312" title="Точки экстремумы.">ModelPointReal</a> = <span class="keyword">new</span> PointF[7]; 
<a name="l00096"></a><a class="code" href="class_chart_v2_1_1_model.html#a44d08295c492e35f33bd222eef000503">00096</a>         <span class="keyword">public</span> PointF[] <a class="code" href="class_chart_v2_1_1_model.html#a44d08295c492e35f33bd222eef000503" title="Точки для построения линий.">ModelPoint</a> = <span class="keyword">new</span> PointF[6];     
<a name="l00097"></a><a class="code" href="class_chart_v2_1_1_model.html#a4f5b3776a015fc2adb3eae5e1fde3492">00097</a>         <span class="keyword">public</span> PointF[] <a class="code" href="class_chart_v2_1_1_model.html#a4f5b3776a015fc2adb3eae5e1fde3492">AttractionPoint</a> = <span class="keyword">new</span> PointF[2];
<a name="l00098"></a><a class="code" href="class_chart_v2_1_1_model.html#ad436c0e6df5719cadacba2505ad5ddc1">00098</a>         <span class="keyword">public</span> PointF[] <a class="code" href="class_chart_v2_1_1_model.html#ad436c0e6df5719cadacba2505ad5ddc1">Targ</a> = <span class="keyword">new</span> PointF[6];
<a name="l00099"></a>00099    <span class="comment">//     public PointF[] DrawingAttractionPoint = new PointF[2];</span>
<a name="l00100"></a><a class="code" href="class_chart_v2_1_1_model.html#aea9086881977a302b4da0b2ac0857792">00100</a>         <span class="keyword">public</span> Styles.ModelStyle <a class="code" href="class_chart_v2_1_1_model.html#aea9086881977a302b4da0b2ac0857792">style</a>;
<a name="l00101"></a><a class="code" href="class_chart_v2_1_1_model.html#abc0a9b01c4ad549217ba82147bef483e">00101</a>         <span class="keyword">public</span> <span class="keywordtype">bool</span> <a class="code" href="class_chart_v2_1_1_model.html#abc0a9b01c4ad549217ba82147bef483e">IsSelected</a> = <span class="keyword">false</span>;
<a name="l00102"></a><a class="code" href="class_chart_v2_1_1_model.html#a665fab89998a8f44659664cbb68012f4">00102</a>         <span class="keyword">public</span> <span class="keywordtype">bool</span> <a class="code" href="class_chart_v2_1_1_model.html#a665fab89998a8f44659664cbb68012f4">IsVisible</a> = <span class="keyword">true</span>;
<a name="l00103"></a>00103 
<a name="l00104"></a>00104         <span class="keyword">public</span> <span class="keywordtype">double</span> <a class="code" href="class_chart_v2_1_1_model.html#a529530da01556ec0bb62005efe9f4277">power</a>
<a name="l00105"></a><a class="code" href="class_chart_v2_1_1_model.html#a529530da01556ec0bb62005efe9f4277">00105</a>         {
<a name="l00106"></a>00106             <span class="keyword">get</span>   <span class="comment">//ModelPointReal[0] is sacral point</span>
<a name="l00107"></a>00107             {
<a name="l00108"></a>00108                 <span class="keywordflow">return</span> Math.Round((<a class="code" href="class_chart_v2_1_1_model.html#a855b270a41ae713519f686dc0125f312" title="Точки экстремумы.">ModelPointReal</a>[3].X - <a class="code" href="class_chart_v2_1_1_model.html#a855b270a41ae713519f686dc0125f312" title="Точки экстремумы.">ModelPointReal</a>[1].X) * 2 / (<a class="code" href="class_chart_v2_1_1_model.html#a855b270a41ae713519f686dc0125f312" title="Точки экстремумы.">ModelPointReal</a>[3].X - <a class="code" href="class_chart_v2_1_1_model.html#a855b270a41ae713519f686dc0125f312" title="Точки экстремумы.">ModelPointReal</a>[0].X), 2);
<a name="l00109"></a>00109             }
<a name="l00110"></a>00110         }
<a name="l00111"></a>00111 
<a name="l00112"></a><a class="code" href="class_chart_v2_1_1_model.html#a3334cef9054a4db2fc5aec94c6ca7056">00112</a>         <span class="keyword">public</span> <a class="code" href="namespace_chart_v2.html#ad32c7a3681414adea76a8836845216da">ModelType</a> <a class="code" href="class_chart_v2_1_1_model.html#a3334cef9054a4db2fc5aec94c6ca7056">type</a>;
<a name="l00113"></a>00113  
<a name="l00114"></a>00114 
<a name="l00115"></a><a class="code" href="class_chart_v2_1_1_model.html#a5527f3fa2782819edce41c283fe6f2a6">00115</a>         <span class="keyword">public</span> <a class="code" href="class_chart_v2_1_1_model.html#a5527f3fa2782819edce41c283fe6f2a6">Model</a>(Skilful.ModelManager.TModel mod, <span class="keywordtype">int</span> color)
<a name="l00116"></a>00116         {
<a name="l00117"></a>00117             <span class="keywordflow">if</span> (((Skilful.ModelManager.Options.VisibleSteps &amp; mod.Step) == 0) ||
<a name="l00118"></a>00118                 (mod.Step &lt; 0))<a class="code" href="class_chart_v2_1_1_model.html#a665fab89998a8f44659664cbb68012f4">IsVisible</a> = <span class="keyword">false</span>;
<a name="l00119"></a>00119             <span class="keywordflow">else</span> <a class="code" href="class_chart_v2_1_1_model.html#a665fab89998a8f44659664cbb68012f4">IsVisible</a> = <span class="keyword">true</span>;
<a name="l00120"></a>00120 
<a name="l00121"></a>00121             Skilful.ModelManager.TPoint LastPoint = <span class="keyword">new</span> Skilful.ModelManager.TPoint();
<a name="l00122"></a>00122             <a class="code" href="class_chart_v2_1_1_model.html#a09db15d16d27e923f44be5205b192ecb">LifeTime</a> = Convert.ToInt32(mod.MaxProcessBar);
<a name="l00123"></a>00123             <a class="code" href="class_chart_v2_1_1_model.html#abf28b47a9d732fcf266868d97ff5c96f">TimeFrame</a> = mod.TimeFrame;
<a name="l00124"></a>00124             <span class="keywordflow">switch</span> (mod.ModelType)
<a name="l00125"></a>00125             {
<a name="l00126"></a>00126                 <span class="keywordflow">case</span> Skilful.ModelManager.Common.TModelType.ModelOfExpansion:
<a name="l00127"></a>00127                     {
<a name="l00128"></a>00128                         color = GlobalMembersTAmodel.cl[0];
<a name="l00129"></a>00129                         <span class="comment">// Начало построения от СТ</span>
<a name="l00130"></a>00130                         <a class="code" href="class_chart_v2_1_1_model.html#a25b71ec0221286c39d0b7a94ce117af7">PointsForDrawing_1_3</a>[0] = mod.PointSP2.pt;
<a name="l00131"></a>00131                         <a class="code" href="class_chart_v2_1_1_model.html#a830db3a2fc646531020e97e4b884b07b">PointsForDrawing_21_4</a>[0] = mod.PointSP2.pt;
<a name="l00132"></a>00132 <span class="comment">//                        LastPoint.X = Math.Max(mod.BreakTrendLine.X, mod.Quotes.GetBarByIndex(mod.Quotes.GetCount() - 1).X);</span>
<a name="l00133"></a>00133                         <a class="code" href="class_chart_v2_1_1_model.html#a44d08295c492e35f33bd222eef000503" title="Точки для построения линий.">ModelPoint</a>[4] = mod.Point4.pt;
<a name="l00134"></a>00134                         <a class="code" href="class_chart_v2_1_1_model.html#ab93e9f8df46cc93f14e69be91d8d5979">CT_4</a>[0] = <span class="keyword">new</span> PointF((<span class="keywordtype">float</span>)(2 * <a class="code" href="class_chart_v2_1_1_model.html#a44d08295c492e35f33bd222eef000503" title="Точки для построения линий.">ModelPoint</a>[4].X - mod.PointSP2.Bar), mod.PointSP2.pt.Y);
<a name="l00135"></a>00135                         <a class="code" href="class_chart_v2_1_1_model.html#ab93e9f8df46cc93f14e69be91d8d5979">CT_4</a>[1] = <span class="keyword">new</span> PointF((<span class="keywordtype">float</span>)(3 * <a class="code" href="class_chart_v2_1_1_model.html#a44d08295c492e35f33bd222eef000503" title="Точки для построения линий.">ModelPoint</a>[4].X - 2 * mod.PointSP2.Bar), mod.PointSP2.pt.Y);
<a name="l00136"></a>00136                         <a class="code" href="class_chart_v2_1_1_model.html#ab93e9f8df46cc93f14e69be91d8d5979">CT_4</a>[2] = <span class="keyword">new</span> PointF((<span class="keywordtype">float</span>)(5 * <a class="code" href="class_chart_v2_1_1_model.html#a44d08295c492e35f33bd222eef000503" title="Точки для построения линий.">ModelPoint</a>[4].X - 4 * mod.PointSP2.Bar), mod.PointSP2.pt.Y);
<a name="l00137"></a>00137 
<a name="l00138"></a>00138                         <span class="keywordflow">if</span> (mod.Point61.Bar &gt; mod.Point41.Bar)
<a name="l00139"></a>00139                         {
<a name="l00140"></a>00140                             LastPoint.Price = Skilful.ModelManager.Common.CalcLineValue(mod.TargetLineTangent, <a class="code" href="class_chart_v2_1_1_model.html#ab93e9f8df46cc93f14e69be91d8d5979">CT_4</a>[2].X);
<a name="l00141"></a>00141                             LastPoint.Bar = <a class="code" href="class_chart_v2_1_1_model.html#ab93e9f8df46cc93f14e69be91d8d5979">CT_4</a>[2].X;
<a name="l00142"></a>00142                             <span class="keywordflow">if</span> ((mod.Point64.Bar &gt; mod.Point41.Bar)
<a name="l00143"></a>00143                                 &amp;&amp; (mod.Point64.Bar &lt;= <a class="code" href="class_chart_v2_1_1_model.html#ab93e9f8df46cc93f14e69be91d8d5979">CT_4</a>[2].X)) <a class="code" href="class_chart_v2_1_1_model.html#a7fbd093fe5537e55564ac99c9dced4f0" title="Дальние HP, через т2 и т2&amp;#39;&amp;#39;.">FarPoint6</a>[2] = mod.Point64.pt;
<a name="l00144"></a>00144                             <span class="keywordflow">if</span> ((mod.Point63.Bar &gt; mod.Point41.Bar)
<a name="l00145"></a>00145                                 &amp;&amp; (mod.Point63.Bar &lt;= <a class="code" href="class_chart_v2_1_1_model.html#ab93e9f8df46cc93f14e69be91d8d5979">CT_4</a>[2].X)
<a name="l00146"></a>00146                                 &amp;&amp; ((mod.ErrorCode &amp; 0x00020000) == 0)) <a class="code" href="class_chart_v2_1_1_model.html#a7fbd093fe5537e55564ac99c9dced4f0" title="Дальние HP, через т2 и т2&amp;#39;&amp;#39;.">FarPoint6</a>[1] = mod.Point63.pt;
<a name="l00147"></a>00147                             <span class="keywordflow">if</span> ((mod.Point62.Bar &gt; mod.Point41.Bar)
<a name="l00148"></a>00148                                 &amp;&amp;(mod.Point62.Bar &lt;= <a class="code" href="class_chart_v2_1_1_model.html#ab93e9f8df46cc93f14e69be91d8d5979">CT_4</a>[2].X) 
<a name="l00149"></a>00149                                 &amp;&amp;((mod.ErrorCode &amp; 0x00010000) == 0)) <a class="code" href="class_chart_v2_1_1_model.html#a7fbd093fe5537e55564ac99c9dced4f0" title="Дальние HP, через т2 и т2&amp;#39;&amp;#39;.">FarPoint6</a>[0] = mod.Point62.pt;
<a name="l00150"></a>00150 
<a name="l00151"></a>00151                         }
<a name="l00152"></a>00152                         <span class="keywordflow">else</span>
<a name="l00153"></a>00153                         {
<a name="l00154"></a>00154                             LastPoint.Price = Skilful.ModelManager.Common.CalcLineValue(mod.TargetLineTangent, <a class="code" href="class_chart_v2_1_1_model.html#ab93e9f8df46cc93f14e69be91d8d5979">CT_4</a>[2].X);
<a name="l00155"></a>00155                             LastPoint.Bar = <a class="code" href="class_chart_v2_1_1_model.html#ab93e9f8df46cc93f14e69be91d8d5979">CT_4</a>[2].X;
<a name="l00156"></a>00156                         }
<a name="l00157"></a>00157                         <a class="code" href="class_chart_v2_1_1_model.html#a830db3a2fc646531020e97e4b884b07b">PointsForDrawing_21_4</a>[1] = LastPoint.pt;
<a name="l00158"></a>00158                         <span class="keywordflow">if</span>(mod.Point6.Bar &gt; mod.Point41.Bar)
<a name="l00159"></a>00159                             <a class="code" href="class_chart_v2_1_1_model.html#a855b270a41ae713519f686dc0125f312" title="Точки экстремумы.">ModelPointReal</a>[6] = mod.Point6.pt;
<a name="l00160"></a>00160                         <span class="keywordflow">else</span> <a class="code" href="class_chart_v2_1_1_model.html#a855b270a41ae713519f686dc0125f312" title="Точки экстремумы.">ModelPointReal</a>[6] = mod.Point4.pt;
<a name="l00161"></a>00161                         <a class="code" href="class_chart_v2_1_1_model.html#a44d08295c492e35f33bd222eef000503" title="Точки для построения линий.">ModelPoint</a>[0] = mod.PointSP2.pt;
<a name="l00162"></a>00162                         <a class="code" href="class_chart_v2_1_1_model.html#a44d08295c492e35f33bd222eef000503" title="Точки для построения линий.">ModelPoint</a>[1] = mod.Point11.pt;
<a name="l00163"></a>00163                         <a class="code" href="class_chart_v2_1_1_model.html#a44d08295c492e35f33bd222eef000503" title="Точки для построения линий.">ModelPoint</a>[2] = mod.Point23.pt;
<a name="l00164"></a>00164                         <a class="code" href="class_chart_v2_1_1_model.html#a44d08295c492e35f33bd222eef000503" title="Точки для построения линий.">ModelPoint</a>[3] = mod.Point32.pt;
<a name="l00165"></a>00165                         <a class="code" href="class_chart_v2_1_1_model.html#a44d08295c492e35f33bd222eef000503" title="Точки для построения линий.">ModelPoint</a>[4] = mod.Point41.pt;
<a name="l00166"></a>00166 
<a name="l00167"></a>00167                         
<a name="l00168"></a>00168                         <a class="code" href="class_chart_v2_1_1_model.html#a855b270a41ae713519f686dc0125f312" title="Точки экстремумы.">ModelPointReal</a>[0] = mod.PointSP2.pt;
<a name="l00169"></a>00169                         <a class="code" href="class_chart_v2_1_1_model.html#a855b270a41ae713519f686dc0125f312" title="Точки экстремумы.">ModelPointReal</a>[1] = mod.Point1.pt;
<a name="l00170"></a>00170                         <a class="code" href="class_chart_v2_1_1_model.html#a855b270a41ae713519f686dc0125f312" title="Точки экстремумы.">ModelPointReal</a>[2] = mod.Point2.pt;
<a name="l00171"></a>00171                         <a class="code" href="class_chart_v2_1_1_model.html#a5d6c3c4018a6c361c15fef5600d7cc5a">_211</a>[0] = mod.Point2.pt;
<a name="l00172"></a>00172                         <a class="code" href="class_chart_v2_1_1_model.html#a5d6c3c4018a6c361c15fef5600d7cc5a">_211</a>[1] = mod.Point22.pt;
<a name="l00173"></a>00173                         <a class="code" href="class_chart_v2_1_1_model.html#a5d6c3c4018a6c361c15fef5600d7cc5a">_211</a>[2] = mod.Point21.pt; <span class="comment">//для НР&#39; если 4!=4&#39;</span>
<a name="l00174"></a>00174                         <a class="code" href="class_chart_v2_1_1_model.html#a855b270a41ae713519f686dc0125f312" title="Точки экстремумы.">ModelPointReal</a>[3] = mod.Point3.pt;
<a name="l00175"></a>00175                         <a class="code" href="class_chart_v2_1_1_model.html#a90419a37bb64253c3f02d83bb05d842c">_31</a> = mod.Point31.pt;
<a name="l00176"></a>00176                         <a class="code" href="class_chart_v2_1_1_model.html#a855b270a41ae713519f686dc0125f312" title="Точки экстремумы.">ModelPointReal</a>[4] = mod.Point4.pt;
<a name="l00177"></a>00177                         <a class="code" href="class_chart_v2_1_1_model.html#a25b71ec0221286c39d0b7a94ce117af7">PointsForDrawing_1_3</a>[1].X = (float)Math.Max(mod.BreakTrendLine.Bar, <a class="code" href="class_chart_v2_1_1_model.html#ab93e9f8df46cc93f14e69be91d8d5979">CT_4</a>[2].X);
<a name="l00178"></a>00178                         <a class="code" href="class_chart_v2_1_1_model.html#a25b71ec0221286c39d0b7a94ce117af7">PointsForDrawing_1_3</a>[1].Y = (float) Skilful.ModelManager.Common.CalcLineValue(mod.TrendLineTangent, <a class="code" href="class_chart_v2_1_1_model.html#a25b71ec0221286c39d0b7a94ce117af7">PointsForDrawing_1_3</a>[1].X);
<a name="l00179"></a>00179                         <span class="comment">//PointsForDrawing_1_3[1] = LastPoint.pt;</span>
<a name="l00180"></a>00180 
<a name="l00181"></a>00181                         <span class="keywordflow">if</span> ((mod.Point61.Bar &lt;= mod.Point41.Bar) || (mod.Point6.Bar == mod.Point4.Bar))
<a name="l00182"></a>00182                         {
<a name="l00183"></a>00183                             <a class="code" href="class_chart_v2_1_1_model.html#a64e549ed71451bb2031477c7d01b49ee">_100Percent</a>[0] = <span class="keyword">new</span> PointF(<a class="code" href="class_chart_v2_1_1_model.html#a855b270a41ae713519f686dc0125f312" title="Точки экстремумы.">ModelPointReal</a>[6].X, (<span class="keywordtype">float</span>)(2 * <a class="code" href="class_chart_v2_1_1_model.html#a855b270a41ae713519f686dc0125f312" title="Точки экстремумы.">ModelPointReal</a>[6].Y - <a class="code" href="class_chart_v2_1_1_model.html#a855b270a41ae713519f686dc0125f312" title="Точки экстремумы.">ModelPointReal</a>[1].Y));
<a name="l00184"></a>00184                             <a class="code" href="class_chart_v2_1_1_model.html#a64e549ed71451bb2031477c7d01b49ee">_100Percent</a>[1] = <span class="keyword">new</span> PointF(<a class="code" href="class_chart_v2_1_1_model.html#a855b270a41ae713519f686dc0125f312" title="Точки экстремумы.">ModelPointReal</a>[6].X, (<span class="keywordtype">float</span>)(3 * <a class="code" href="class_chart_v2_1_1_model.html#a855b270a41ae713519f686dc0125f312" title="Точки экстремумы.">ModelPointReal</a>[6].Y - 2 * <a class="code" href="class_chart_v2_1_1_model.html#a855b270a41ae713519f686dc0125f312" title="Точки экстремумы.">ModelPointReal</a>[1].Y));
<a name="l00185"></a>00185                         }
<a name="l00186"></a>00186                         <span class="keywordflow">else</span>
<a name="l00187"></a>00187                         {
<a name="l00188"></a>00188                             <span class="comment">//if (mod.HPBreakOut)</span>
<a name="l00189"></a>00189                             {
<a name="l00190"></a>00190 <span class="comment">//                                _100Percent[0] = new PointF((float)mod.Point61.Bar, (float)(2 * mod.Point61.Price - ModelPointReal[1].Y));</span>
<a name="l00191"></a>00191 <span class="comment">//                                _100Percent[1] = new PointF((float)mod.Point61.Bar, (float)(3 * mod.Point61.Price - 2 * ModelPointReal[1].Y));</span>
<a name="l00192"></a>00192                                 <a class="code" href="class_chart_v2_1_1_model.html#a64e549ed71451bb2031477c7d01b49ee">_100Percent</a>[0] = <span class="keyword">new</span> PointF((<span class="keywordtype">float</span>)mod.Point61Pct100.Bar, (<span class="keywordtype">float</span>)mod.Point61Pct100.Price);
<a name="l00193"></a>00193                                 <a class="code" href="class_chart_v2_1_1_model.html#a64e549ed71451bb2031477c7d01b49ee">_100Percent</a>[1] = <span class="keyword">new</span> PointF((<span class="keywordtype">float</span>)mod.Point61Pct200.Bar, (<span class="keywordtype">float</span>)mod.Point61Pct200.Price );
<a name="l00194"></a>00194                             }
<a name="l00195"></a>00195                         }
<a name="l00196"></a>00196                         <a class="code" href="class_chart_v2_1_1_model.html#ad436c0e6df5719cadacba2505ad5ddc1">Targ</a>[0] = mod.Target1.pt;
<a name="l00197"></a>00197                         <a class="code" href="class_chart_v2_1_1_model.html#ad436c0e6df5719cadacba2505ad5ddc1">Targ</a>[1] = mod.Target2.pt;
<a name="l00198"></a>00198                         <a class="code" href="class_chart_v2_1_1_model.html#ad436c0e6df5719cadacba2505ad5ddc1">Targ</a>[2] = mod.Target3.pt;
<a name="l00199"></a>00199 <span class="comment">/*                      if (!mod.BreakTargetLineFirst.pt.IsEmpty)</span>
<a name="l00200"></a>00200 <span class="comment">                        {</span>
<a name="l00201"></a>00201 <span class="comment">                            Targ[3] = mod.Target4.pt;</span>
<a name="l00202"></a>00202 <span class="comment">                            Targ[4] = mod.Target5.pt;</span>
<a name="l00203"></a>00203 <span class="comment">                            Targ[5] = mod.Target6.pt;</span>
<a name="l00204"></a>00204 <span class="comment">                        }*/</span>
<a name="l00205"></a>00205                        <a class="code" href="class_chart_v2_1_1_model.html#a3334cef9054a4db2fc5aec94c6ca7056">type</a> = <a class="code" href="namespace_chart_v2.html#ad32c7a3681414adea76a8836845216da">ModelType</a>.MP;
<a name="l00206"></a>00206                        <span class="keywordflow">break</span>;
<a name="l00207"></a>00207                       
<a name="l00208"></a>00208                     }
<a name="l00209"></a>00209                 <span class="keywordflow">case</span> Skilful.ModelManager.Common.TModelType.ModelOfAttraction:
<a name="l00210"></a>00210                     {
<a name="l00211"></a>00211                         color = GlobalMembersTAmodel.cl[1];
<a name="l00212"></a>00212                         <a class="code" href="class_chart_v2_1_1_model.html#a25b71ec0221286c39d0b7a94ce117af7">PointsForDrawing_1_3</a>[0] = mod.Point11.pt;
<a name="l00213"></a>00213                         <a class="code" href="class_chart_v2_1_1_model.html#a830db3a2fc646531020e97e4b884b07b">PointsForDrawing_21_4</a>[0] = mod.Point23.pt;
<a name="l00214"></a>00214                         <span class="comment">// Конец построения по точке пересечения ЛТ и ЛЦ</span>
<a name="l00215"></a>00215                         LastPoint = mod.PointSP2;
<a name="l00216"></a>00216                         <a class="code" href="class_chart_v2_1_1_model.html#a25b71ec0221286c39d0b7a94ce117af7">PointsForDrawing_1_3</a>[1] = LastPoint.pt;
<a name="l00217"></a>00217                         <a class="code" href="class_chart_v2_1_1_model.html#a830db3a2fc646531020e97e4b884b07b">PointsForDrawing_21_4</a>[1] = LastPoint.pt;
<a name="l00218"></a>00218 
<a name="l00219"></a>00219                        <span class="comment">// ModelPoint[0] = LastPoint.pt;</span>
<a name="l00220"></a>00220                         <a class="code" href="class_chart_v2_1_1_model.html#a44d08295c492e35f33bd222eef000503" title="Точки для построения линий.">ModelPoint</a>[1] = mod.Point11.pt;
<a name="l00221"></a>00221                         <a class="code" href="class_chart_v2_1_1_model.html#a44d08295c492e35f33bd222eef000503" title="Точки для построения линий.">ModelPoint</a>[2] = mod.Point23.pt;
<a name="l00222"></a>00222                         <a class="code" href="class_chart_v2_1_1_model.html#a44d08295c492e35f33bd222eef000503" title="Точки для построения линий.">ModelPoint</a>[3] = mod.Point32.pt;
<a name="l00223"></a>00223                         <a class="code" href="class_chart_v2_1_1_model.html#a44d08295c492e35f33bd222eef000503" title="Точки для построения линий.">ModelPoint</a>[4] = mod.Point41.pt;
<a name="l00224"></a>00224                         <span class="comment">//ModelPoint[5] = LastPoint.pt;</span>
<a name="l00225"></a>00225      
<a name="l00226"></a>00226                         <span class="comment">//CT = PointF.Empty;</span>
<a name="l00227"></a>00227                         <a class="code" href="class_chart_v2_1_1_model.html#a855b270a41ae713519f686dc0125f312" title="Точки экстремумы.">ModelPointReal</a>[0] = PointF.Empty;
<a name="l00228"></a>00228                         <a class="code" href="class_chart_v2_1_1_model.html#a855b270a41ae713519f686dc0125f312" title="Точки экстремумы.">ModelPointReal</a>[1] = mod.Point1.pt;
<a name="l00229"></a>00229                         <a class="code" href="class_chart_v2_1_1_model.html#a855b270a41ae713519f686dc0125f312" title="Точки экстремумы.">ModelPointReal</a>[2] = mod.Point21.pt;
<a name="l00230"></a>00230                         <a class="code" href="class_chart_v2_1_1_model.html#a64e549ed71451bb2031477c7d01b49ee">_100Percent</a>[0] = <span class="keyword">new</span> PointF(LastPoint.pt.X, (<span class="keywordtype">float</span>)(2 * LastPoint.pt.Y - <a class="code" href="class_chart_v2_1_1_model.html#a855b270a41ae713519f686dc0125f312" title="Точки экстремумы.">ModelPointReal</a>[1].Y));
<a name="l00231"></a>00231                         <a class="code" href="class_chart_v2_1_1_model.html#a64e549ed71451bb2031477c7d01b49ee">_100Percent</a>[1] = <span class="keyword">new</span> PointF(LastPoint.pt.X, (<span class="keywordtype">float</span>)(3 * LastPoint.pt.Y - 2 * <a class="code" href="class_chart_v2_1_1_model.html#a855b270a41ae713519f686dc0125f312" title="Точки экстремумы.">ModelPointReal</a>[1].Y)); 
<a name="l00232"></a>00232 
<a name="l00233"></a>00233                         
<a name="l00234"></a>00234                         <a class="code" href="class_chart_v2_1_1_model.html#a5d6c3c4018a6c361c15fef5600d7cc5a">_211</a>[0] = PointF.Empty;
<a name="l00235"></a>00235                         <a class="code" href="class_chart_v2_1_1_model.html#a5d6c3c4018a6c361c15fef5600d7cc5a">_211</a>[1] = PointF.Empty;
<a name="l00236"></a>00236                         <a class="code" href="class_chart_v2_1_1_model.html#a5d6c3c4018a6c361c15fef5600d7cc5a">_211</a>[2] = PointF.Empty;
<a name="l00237"></a>00237                         <a class="code" href="class_chart_v2_1_1_model.html#a855b270a41ae713519f686dc0125f312" title="Точки экстремумы.">ModelPointReal</a>[3] = mod.Point3.pt;
<a name="l00238"></a>00238                         <a class="code" href="class_chart_v2_1_1_model.html#a90419a37bb64253c3f02d83bb05d842c">_31</a> = PointF.Empty;
<a name="l00239"></a>00239                         <a class="code" href="class_chart_v2_1_1_model.html#a855b270a41ae713519f686dc0125f312" title="Точки экстремумы.">ModelPointReal</a>[4] = mod.Point41.pt;
<a name="l00240"></a>00240                         <span class="comment">//ModelPointReal[6] = LastPoint.pt;</span>
<a name="l00241"></a>00241                         <a class="code" href="class_chart_v2_1_1_model.html#a855b270a41ae713519f686dc0125f312" title="Точки экстремумы.">ModelPointReal</a>[6] = PointF.Empty;
<a name="l00242"></a>00242                         <a class="code" href="class_chart_v2_1_1_model.html#ad436c0e6df5719cadacba2505ad5ddc1">Targ</a>[0] = mod.Target1.pt;
<a name="l00243"></a>00243                         <span class="comment">//Targ[1] = mod.Target2.pt;</span>
<a name="l00244"></a>00244                         <span class="comment">//Targ[2] = mod.Target3.pt;</span>
<a name="l00245"></a>00245                         <span class="comment">//Targ[3] = mod.Target4.pt;</span>
<a name="l00246"></a>00246 
<a name="l00247"></a>00247                         <a class="code" href="class_chart_v2_1_1_model.html#a3334cef9054a4db2fc5aec94c6ca7056">type</a> = <a class="code" href="namespace_chart_v2.html#ad32c7a3681414adea76a8836845216da">ModelType</a>.ATR;
<a name="l00248"></a>00248                         <span class="keywordflow">break</span>;
<a name="l00249"></a>00249                     }
<a name="l00250"></a>00250                 <span class="keywordflow">case</span> Skilful.ModelManager.Common.TModelType.ModelOfBalance:
<a name="l00251"></a>00251                     {
<a name="l00252"></a>00252                         color = GlobalMembersTAmodel.cl[2];
<a name="l00253"></a>00253                         <a class="code" href="class_chart_v2_1_1_model.html#a25b71ec0221286c39d0b7a94ce117af7">PointsForDrawing_1_3</a>[0] = mod.Point11.pt;
<a name="l00254"></a>00254                         <a class="code" href="class_chart_v2_1_1_model.html#a830db3a2fc646531020e97e4b884b07b">PointsForDrawing_21_4</a>[0] = mod.Point23.pt;
<a name="l00255"></a>00255 <span class="comment">//                        LastPoint.X = Math.Max(mod.BreakTrendLine.X, mod.Quotes.GetBarByIndex(mod.Quotes.GetCount() - 1).X);</span>
<a name="l00256"></a>00256                         LastPoint.Bar = Math.Max(mod.BreakTrendLine.Bar, 2*mod.Point41.Bar-mod.Point11.Bar);
<a name="l00257"></a>00257                         LastPoint.Price = Skilful.ModelManager.Common.CalcLineValue(mod.TrendLineTangent, LastPoint.Bar);
<a name="l00258"></a>00258                         <a class="code" href="class_chart_v2_1_1_model.html#a25b71ec0221286c39d0b7a94ce117af7">PointsForDrawing_1_3</a>[1] = LastPoint.pt;
<a name="l00259"></a>00259                         <span class="keywordflow">if</span> (mod.Point61.Bar &gt; mod.Point4.Bar)
<a name="l00260"></a>00260                         {
<a name="l00261"></a>00261                             LastPoint.Price = Skilful.ModelManager.Common.CalcLineValue(mod.TargetLineTangent, Math.Max(mod.Point61.Bar,LastPoint.Bar));
<a name="l00262"></a>00262                             LastPoint.Bar = Math.Max(mod.Point61.Bar, LastPoint.Bar);
<a name="l00263"></a>00263                         }
<a name="l00264"></a>00264                         <span class="keywordflow">else</span>
<a name="l00265"></a>00265                         {
<a name="l00266"></a>00266                             LastPoint.Price = Skilful.ModelManager.Common.CalcLineValue(mod.TargetLineTangent, <a class="code" href="class_chart_v2_1_1_model.html#a25b71ec0221286c39d0b7a94ce117af7">PointsForDrawing_1_3</a>[1].X);
<a name="l00267"></a>00267                             LastPoint.Bar = <a class="code" href="class_chart_v2_1_1_model.html#a25b71ec0221286c39d0b7a94ce117af7">PointsForDrawing_1_3</a>[1].X;
<a name="l00268"></a>00268                         }
<a name="l00269"></a>00269                         <a class="code" href="class_chart_v2_1_1_model.html#a830db3a2fc646531020e97e4b884b07b">PointsForDrawing_21_4</a>[1] = LastPoint.pt;
<a name="l00270"></a>00270 
<a name="l00271"></a>00271                         <span class="keywordflow">if</span> (mod.Point6.Bar &gt; mod.Point41.Bar)
<a name="l00272"></a>00272                             <a class="code" href="class_chart_v2_1_1_model.html#a855b270a41ae713519f686dc0125f312" title="Точки экстремумы.">ModelPointReal</a>[6] = mod.Point6.pt;
<a name="l00273"></a>00273                         <span class="keywordflow">else</span> <a class="code" href="class_chart_v2_1_1_model.html#a855b270a41ae713519f686dc0125f312" title="Точки экстремумы.">ModelPointReal</a>[6] = mod.Point4.pt;
<a name="l00274"></a>00274 
<a name="l00275"></a>00275                         <a class="code" href="class_chart_v2_1_1_model.html#a44d08295c492e35f33bd222eef000503" title="Точки для построения линий.">ModelPoint</a>[1] = mod.Point11.pt;
<a name="l00276"></a>00276                         <a class="code" href="class_chart_v2_1_1_model.html#a44d08295c492e35f33bd222eef000503" title="Точки для построения линий.">ModelPoint</a>[2] = mod.Point23.pt;
<a name="l00277"></a>00277                         <a class="code" href="class_chart_v2_1_1_model.html#a44d08295c492e35f33bd222eef000503" title="Точки для построения линий.">ModelPoint</a>[3] = mod.Point32.pt;
<a name="l00278"></a>00278                         <a class="code" href="class_chart_v2_1_1_model.html#a44d08295c492e35f33bd222eef000503" title="Точки для построения линий.">ModelPoint</a>[4] = mod.Point41.pt;
<a name="l00279"></a>00279                         <span class="comment">//ModelPoint[5] = LastPoint.pt;</span>
<a name="l00280"></a>00280                         <a class="code" href="class_chart_v2_1_1_model.html#ab93e9f8df46cc93f14e69be91d8d5979">CT_4</a>[2] = <span class="keyword">new</span> PointF((<span class="keywordtype">float</span>)(5 * <a class="code" href="class_chart_v2_1_1_model.html#a44d08295c492e35f33bd222eef000503" title="Точки для построения линий.">ModelPoint</a>[4].X - 4 * <a class="code" href="class_chart_v2_1_1_model.html#a44d08295c492e35f33bd222eef000503" title="Точки для построения линий.">ModelPoint</a>[1].X), <a class="code" href="class_chart_v2_1_1_model.html#a44d08295c492e35f33bd222eef000503" title="Точки для построения линий.">ModelPoint</a>[4].Y);
<a name="l00281"></a>00281                         <span class="comment">//CT = PointF.Empty;</span>
<a name="l00282"></a>00282                         <a class="code" href="class_chart_v2_1_1_model.html#a855b270a41ae713519f686dc0125f312" title="Точки экстремумы.">ModelPointReal</a>[0] = PointF.Empty;
<a name="l00283"></a>00283                         <a class="code" href="class_chart_v2_1_1_model.html#a855b270a41ae713519f686dc0125f312" title="Точки экстремумы.">ModelPointReal</a>[1] = mod.Point1.pt;
<a name="l00284"></a>00284                         <a class="code" href="class_chart_v2_1_1_model.html#a855b270a41ae713519f686dc0125f312" title="Точки экстремумы.">ModelPointReal</a>[2] = mod.Point2.pt;
<a name="l00285"></a>00285           
<a name="l00286"></a>00286                         <span class="keywordflow">if</span> ((mod.Point61.Bar &lt;= mod.Point41.Bar) || (mod.Point6.Bar == mod.Point4.Bar))
<a name="l00287"></a>00287                         {
<a name="l00288"></a>00288                             <a class="code" href="class_chart_v2_1_1_model.html#a64e549ed71451bb2031477c7d01b49ee">_100Percent</a>[0] = <span class="keyword">new</span> PointF(<a class="code" href="class_chart_v2_1_1_model.html#a855b270a41ae713519f686dc0125f312" title="Точки экстремумы.">ModelPointReal</a>[6].X, (<span class="keywordtype">float</span>)(2 * <a class="code" href="class_chart_v2_1_1_model.html#a855b270a41ae713519f686dc0125f312" title="Точки экстремумы.">ModelPointReal</a>[6].Y - <a class="code" href="class_chart_v2_1_1_model.html#a855b270a41ae713519f686dc0125f312" title="Точки экстремумы.">ModelPointReal</a>[1].Y));
<a name="l00289"></a>00289                             <a class="code" href="class_chart_v2_1_1_model.html#a64e549ed71451bb2031477c7d01b49ee">_100Percent</a>[1] = <span class="keyword">new</span> PointF(<a class="code" href="class_chart_v2_1_1_model.html#a855b270a41ae713519f686dc0125f312" title="Точки экстремумы.">ModelPointReal</a>[6].X, (<span class="keywordtype">float</span>)(3 * <a class="code" href="class_chart_v2_1_1_model.html#a855b270a41ae713519f686dc0125f312" title="Точки экстремумы.">ModelPointReal</a>[6].Y - 2 * <a class="code" href="class_chart_v2_1_1_model.html#a855b270a41ae713519f686dc0125f312" title="Точки экстремумы.">ModelPointReal</a>[1].Y));
<a name="l00290"></a>00290                         }
<a name="l00291"></a>00291                         <span class="keywordflow">else</span>
<a name="l00292"></a>00292                         {
<a name="l00293"></a>00293                             <span class="comment">//if (mod.HPBreakOut)</span>
<a name="l00294"></a>00294                             {
<a name="l00295"></a>00295                                 <a class="code" href="class_chart_v2_1_1_model.html#a64e549ed71451bb2031477c7d01b49ee">_100Percent</a>[0] = <span class="keyword">new</span> PointF((<span class="keywordtype">float</span>)mod.Point61.Bar, (<span class="keywordtype">float</span>)(2 * mod.Point61.Price - <a class="code" href="class_chart_v2_1_1_model.html#a855b270a41ae713519f686dc0125f312" title="Точки экстремумы.">ModelPointReal</a>[1].Y));
<a name="l00296"></a>00296                                 <a class="code" href="class_chart_v2_1_1_model.html#a64e549ed71451bb2031477c7d01b49ee">_100Percent</a>[1] = <span class="keyword">new</span> PointF((<span class="keywordtype">float</span>)mod.Point61.Bar, (<span class="keywordtype">float</span>)(3 * mod.Point61.Price - 2 * <a class="code" href="class_chart_v2_1_1_model.html#a855b270a41ae713519f686dc0125f312" title="Точки экстремумы.">ModelPointReal</a>[1].Y));
<a name="l00297"></a>00297                             }
<a name="l00298"></a>00298                         }
<a name="l00299"></a>00299                         <a class="code" href="class_chart_v2_1_1_model.html#a5d6c3c4018a6c361c15fef5600d7cc5a">_211</a>[0] = PointF.Empty;
<a name="l00300"></a>00300                         <a class="code" href="class_chart_v2_1_1_model.html#a5d6c3c4018a6c361c15fef5600d7cc5a">_211</a>[1] = PointF.Empty;
<a name="l00301"></a>00301                         <a class="code" href="class_chart_v2_1_1_model.html#a5d6c3c4018a6c361c15fef5600d7cc5a">_211</a>[2] = PointF.Empty;
<a name="l00302"></a>00302                         <a class="code" href="class_chart_v2_1_1_model.html#a855b270a41ae713519f686dc0125f312" title="Точки экстремумы.">ModelPointReal</a>[3] = mod.Point3.pt;
<a name="l00303"></a>00303                         <a class="code" href="class_chart_v2_1_1_model.html#a90419a37bb64253c3f02d83bb05d842c">_31</a> = mod.Point31.pt;
<a name="l00304"></a>00304                         <a class="code" href="class_chart_v2_1_1_model.html#a855b270a41ae713519f686dc0125f312" title="Точки экстремумы.">ModelPointReal</a>[4] = mod.Point4.pt;
<a name="l00305"></a>00305                         <a class="code" href="class_chart_v2_1_1_model.html#ad436c0e6df5719cadacba2505ad5ddc1">Targ</a>[0] = mod.Target1.pt;
<a name="l00306"></a>00306                         <a class="code" href="class_chart_v2_1_1_model.html#ad436c0e6df5719cadacba2505ad5ddc1">Targ</a>[1] = mod.Target2.pt;
<a name="l00307"></a>00307                         <a class="code" href="class_chart_v2_1_1_model.html#ad436c0e6df5719cadacba2505ad5ddc1">Targ</a>[2] = mod.Target3.pt;
<a name="l00308"></a>00308                         <a class="code" href="class_chart_v2_1_1_model.html#ad436c0e6df5719cadacba2505ad5ddc1">Targ</a>[3] = mod.Target4.pt;
<a name="l00309"></a>00309 
<a name="l00310"></a>00310                         <a class="code" href="class_chart_v2_1_1_model.html#a3334cef9054a4db2fc5aec94c6ca7056">type</a> = <a class="code" href="namespace_chart_v2.html#ad32c7a3681414adea76a8836845216da">ModelType</a>.MDR;
<a name="l00311"></a>00311                         <span class="keywordflow">break</span>;
<a name="l00312"></a>00312                     }
<a name="l00313"></a>00313             }
<a name="l00314"></a>00314             <span class="keywordflow">if</span> (mod.Point6.Bar &gt; mod.Point41.Bar)
<a name="l00315"></a>00315             {   <span class="comment">// Модель с 6-й точкой</span>
<a name="l00316"></a>00316                 
<a name="l00317"></a>00317                 <a class="code" href="class_chart_v2_1_1_model.html#a4f5b3776a015fc2adb3eae5e1fde3492">AttractionPoint</a>[0] = mod.Point31.pt;
<a name="l00318"></a>00318                 <a class="code" href="class_chart_v2_1_1_model.html#a4f5b3776a015fc2adb3eae5e1fde3492">AttractionPoint</a>[1] = mod.Point5.pt;
<a name="l00319"></a>00319                 
<a name="l00320"></a>00320                 <span class="keywordflow">if</span> (mod.ModelType == Skilful.ModelManager.Common.TModelType.ModelOfAttraction)
<a name="l00321"></a>00321                 {
<a name="l00322"></a>00322                     <a class="code" href="class_chart_v2_1_1_model.html#a1dd889802f9bbe5885fe091cbb84f378">PointsForDrawing_31_5</a>[1] = mod.Point61.pt;
<a name="l00323"></a>00323                     <a class="code" href="class_chart_v2_1_1_model.html#a855b270a41ae713519f686dc0125f312" title="Точки экстремумы.">ModelPointReal</a>[6] = PointF.Empty;
<a name="l00324"></a>00324                     <a class="code" href="class_chart_v2_1_1_model.html#a44d08295c492e35f33bd222eef000503" title="Точки для построения линий.">ModelPoint</a>[5] = PointF.Empty;
<a name="l00325"></a>00325                 }
<a name="l00326"></a>00326                 <span class="keywordflow">else</span>
<a name="l00327"></a>00327                 {
<a name="l00328"></a>00328                     <a class="code" href="class_chart_v2_1_1_model.html#a855b270a41ae713519f686dc0125f312" title="Точки экстремумы.">ModelPointReal</a>[6] = mod.Point6.pt;
<a name="l00329"></a>00329                     <a class="code" href="class_chart_v2_1_1_model.html#a44d08295c492e35f33bd222eef000503" title="Точки для построения линий.">ModelPoint</a>[5] = mod.Point6.pt;
<a name="l00330"></a>00330                 }
<a name="l00331"></a>00331                 <a class="code" href="class_chart_v2_1_1_model.html#a855b270a41ae713519f686dc0125f312" title="Точки экстремумы.">ModelPointReal</a>[5] = mod.Point5.pt;
<a name="l00332"></a>00332 
<a name="l00333"></a>00333                 <a class="code" href="class_chart_v2_1_1_model.html#a81b13a79a35fb94055aa7bcc10c0abeb">_6</a> = mod.Point6.pt;
<a name="l00334"></a>00334                 <span class="keywordflow">if</span> (mod.Point61.Bar &gt; mod.Point41.Bar+1)
<a name="l00335"></a>00335                 {
<a name="l00336"></a>00336                     <span class="comment">// Модель с МПМР</span>
<a name="l00337"></a>00337                     <span class="comment">// ModelPointReal[6] = mod.Point62.pt;</span>
<a name="l00338"></a>00338                     <span class="comment">//if (mod.ModelType == Skilful.ModelManager.Common.TModelType.ModelOfAttraction)</span>
<a name="l00339"></a>00339                     <a class="code" href="class_chart_v2_1_1_model.html#a44d08295c492e35f33bd222eef000503" title="Точки для построения линий.">ModelPoint</a>[5] = mod.Point61.pt;
<a name="l00340"></a>00340                     <a class="code" href="class_chart_v2_1_1_model.html#a1dd889802f9bbe5885fe091cbb84f378">PointsForDrawing_31_5</a>[0] = mod.Point31.pt;
<a name="l00341"></a>00341                     
<a name="l00342"></a>00342                     <span class="keywordflow">if</span> (mod.Point61.Bar &lt; <a class="code" href="class_chart_v2_1_1_model.html#ab93e9f8df46cc93f14e69be91d8d5979">CT_4</a>[2].X &amp;&amp; mod.Point61.Bar &gt; <a class="code" href="class_chart_v2_1_1_model.html#a1dd889802f9bbe5885fe091cbb84f378">PointsForDrawing_31_5</a>[1].X)
<a name="l00343"></a>00343                         <a class="code" href="class_chart_v2_1_1_model.html#a1dd889802f9bbe5885fe091cbb84f378">PointsForDrawing_31_5</a>[1] = mod.Point61.pt;
<a name="l00344"></a>00344 
<a name="l00345"></a>00345                     <span class="keywordflow">if</span> ((mod.Point64.Bar &gt; mod.Point4.Bar + 1)
<a name="l00346"></a>00346                         &amp;&amp; (mod.Point64.Bar &lt; <a class="code" href="class_chart_v2_1_1_model.html#ab93e9f8df46cc93f14e69be91d8d5979">CT_4</a>[2].X)
<a name="l00347"></a>00347                         &amp;&amp; mod.Point64.Bar &gt; <a class="code" href="class_chart_v2_1_1_model.html#a1dd889802f9bbe5885fe091cbb84f378">PointsForDrawing_31_5</a>[1].X)  <a class="code" href="class_chart_v2_1_1_model.html#a1dd889802f9bbe5885fe091cbb84f378">PointsForDrawing_31_5</a>[1] = mod.Point64.pt;
<a name="l00348"></a>00348 
<a name="l00349"></a>00349                     <span class="keywordflow">if</span> ((mod.Point63.Bar &gt; mod.Point4.Bar + 1)
<a name="l00350"></a>00350                         &amp;&amp; (mod.Point63.Bar &lt; <a class="code" href="class_chart_v2_1_1_model.html#ab93e9f8df46cc93f14e69be91d8d5979">CT_4</a>[2].X)
<a name="l00351"></a>00351                         &amp;&amp; mod.Point63.Bar &gt; <a class="code" href="class_chart_v2_1_1_model.html#a1dd889802f9bbe5885fe091cbb84f378">PointsForDrawing_31_5</a>[1].X
<a name="l00352"></a>00352                         &amp;&amp; ((mod.ErrorCode &amp; 0x00020000) == 0))           <a class="code" href="class_chart_v2_1_1_model.html#a1dd889802f9bbe5885fe091cbb84f378">PointsForDrawing_31_5</a>[1] = mod.Point63.pt;
<a name="l00353"></a>00353 
<a name="l00354"></a>00354                     <span class="keywordflow">if</span> ((mod.Point62.Bar &gt; mod.Point4.Bar + 1)
<a name="l00355"></a>00355                         &amp;&amp; (mod.Point62.Bar &lt; <a class="code" href="class_chart_v2_1_1_model.html#ab93e9f8df46cc93f14e69be91d8d5979">CT_4</a>[2].X)
<a name="l00356"></a>00356                         &amp;&amp; mod.Point62.Bar &gt; <a class="code" href="class_chart_v2_1_1_model.html#a1dd889802f9bbe5885fe091cbb84f378">PointsForDrawing_31_5</a>[1].X
<a name="l00357"></a>00357                         &amp;&amp; ((mod.ErrorCode &amp; 0x00010000) == 0))           <a class="code" href="class_chart_v2_1_1_model.html#a1dd889802f9bbe5885fe091cbb84f378">PointsForDrawing_31_5</a>[1] = mod.Point62.pt;
<a name="l00358"></a>00358                 }
<a name="l00359"></a>00359             }
<a name="l00360"></a>00360             <span class="keywordflow">else</span>
<a name="l00361"></a>00361             {
<a name="l00362"></a>00362                 
<a name="l00363"></a>00363                 <a class="code" href="class_chart_v2_1_1_model.html#a4f5b3776a015fc2adb3eae5e1fde3492">AttractionPoint</a>[0] = PointF.Empty;
<a name="l00364"></a>00364                 <a class="code" href="class_chart_v2_1_1_model.html#a4f5b3776a015fc2adb3eae5e1fde3492">AttractionPoint</a>[1] = PointF.Empty;
<a name="l00365"></a>00365                 <a class="code" href="class_chart_v2_1_1_model.html#a855b270a41ae713519f686dc0125f312" title="Точки экстремумы.">ModelPointReal</a>[5] = PointF.Empty;
<a name="l00366"></a>00366                 <a class="code" href="class_chart_v2_1_1_model.html#a81b13a79a35fb94055aa7bcc10c0abeb">_6</a> = PointF.Empty;
<a name="l00367"></a>00367                 <span class="keywordflow">if</span> (mod.ModelType != Skilful.ModelManager.Common.TModelType.ModelOfAttraction)
<a name="l00368"></a>00368                     <a class="code" href="class_chart_v2_1_1_model.html#a855b270a41ae713519f686dc0125f312" title="Точки экстремумы.">ModelPointReal</a>[6] = <a class="code" href="class_chart_v2_1_1_model.html#a855b270a41ae713519f686dc0125f312" title="Точки экстремумы.">ModelPointReal</a>[4];
<a name="l00369"></a>00369                 <a class="code" href="class_chart_v2_1_1_model.html#a1dd889802f9bbe5885fe091cbb84f378">PointsForDrawing_31_5</a>[0] = PointF.Empty;
<a name="l00370"></a>00370                 <a class="code" href="class_chart_v2_1_1_model.html#a1dd889802f9bbe5885fe091cbb84f378">PointsForDrawing_31_5</a>[1] = PointF.Empty;
<a name="l00371"></a>00371             }
<a name="l00372"></a>00372            
<a name="l00373"></a>00373 
<a name="l00374"></a>00374             <span class="comment">//this.style = new ChartV2.Styles.ModelStyle(Color.FromArgb(255,Color.FromArgb(color)),Color.FromArgb(100,Color.FromArgb(color)));</span>
<a name="l00375"></a>00375             this.<a class="code" href="class_chart_v2_1_1_model.html#aea9086881977a302b4da0b2ac0857792">style</a> = <span class="keyword">new</span> ChartV2.Styles.ModelStyle(mod.Step);
<a name="l00376"></a>00376             this.<a class="code" href="class_chart_v2_1_1_model.html#ac5004f61ad74367457e94506bac1b70d">HTi</a> = mod.HTi;
<a name="l00377"></a>00377 
<a name="l00378"></a>00378         }
<a name="l00379"></a>00379 
<a name="l00380"></a><a class="code" href="class_chart_v2_1_1_model.html#ad8caf0bb3f59f948641bc2f457a9b5da">00380</a>         <span class="keyword">public</span> <span class="keywordtype">bool</span> <a class="code" href="class_chart_v2_1_1_model.html#ad8caf0bb3f59f948641bc2f457a9b5da">IsModelClicked</a>(<span class="keywordtype">int</span> X, <span class="keywordtype">int</span> Y, Data.ViewPort viewPort)
<a name="l00381"></a>00381         {
<a name="l00382"></a>00382             X1 = (int) viewPort.BarNumberToPixels(<a class="code" href="class_chart_v2_1_1_model.html#a25b71ec0221286c39d0b7a94ce117af7">PointsForDrawing_1_3</a>[0].X);
<a name="l00383"></a>00383             X2 = (int) viewPort.BarNumberToPixels(<a class="code" href="class_chart_v2_1_1_model.html#a25b71ec0221286c39d0b7a94ce117af7">PointsForDrawing_1_3</a>[1].X);
<a name="l00384"></a>00384             Y1 = (int) viewPort.PriceToPixels(<a class="code" href="class_chart_v2_1_1_model.html#a25b71ec0221286c39d0b7a94ce117af7">PointsForDrawing_1_3</a>[0].Y);
<a name="l00385"></a>00385             Y2 = (int) viewPort.PriceToPixels(<a class="code" href="class_chart_v2_1_1_model.html#a25b71ec0221286c39d0b7a94ce117af7">PointsForDrawing_1_3</a>[1].Y);
<a name="l00386"></a>00386             <span class="comment">//проверка на касание трендовой</span>
<a name="l00387"></a>00387             <span class="keywordflow">if</span> ((X &gt; X1) &amp;&amp; (X &lt; X2))
<a name="l00388"></a>00388             {
<a name="l00389"></a>00389                 <span class="keywordflow">if</span> (Math.Abs((Y - Y1) * (X2 - X1) - (X - X1) * (Y2 - Y1)) &lt; ((Math.Abs(Y2 - Y1) + (X2 - X1)) * 2))
<a name="l00390"></a>00390                     <span class="keywordflow">return</span> <span class="keyword">true</span>;
<a name="l00391"></a>00391             }
<a name="l00392"></a>00392 
<a name="l00393"></a>00393             X1 = (int) viewPort.BarNumberToPixels(<a class="code" href="class_chart_v2_1_1_model.html#a830db3a2fc646531020e97e4b884b07b">PointsForDrawing_21_4</a>[0].X);
<a name="l00394"></a>00394             X2 = (int) viewPort.BarNumberToPixels(<a class="code" href="class_chart_v2_1_1_model.html#a830db3a2fc646531020e97e4b884b07b">PointsForDrawing_21_4</a>[1].X);
<a name="l00395"></a>00395             Y1 = (int) viewPort.PriceToPixels(<a class="code" href="class_chart_v2_1_1_model.html#a830db3a2fc646531020e97e4b884b07b">PointsForDrawing_21_4</a>[0].Y);
<a name="l00396"></a>00396             Y2 = (int) viewPort.PriceToPixels(<a class="code" href="class_chart_v2_1_1_model.html#a830db3a2fc646531020e97e4b884b07b">PointsForDrawing_21_4</a>[1].Y);
<a name="l00397"></a>00397 
<a name="l00398"></a>00398             <span class="comment">//проверка на касание целевой</span>
<a name="l00399"></a>00399             <span class="keywordflow">if</span> ((X &gt; X1) &amp;&amp; (X &lt; X2))
<a name="l00400"></a>00400             {
<a name="l00401"></a>00401                 <span class="keywordflow">if</span> (Math.Abs((Y - Y1) * (X2 - X1) - (X - X1) * (Y2 - Y1)) &lt; ((Math.Abs(Y2 - Y1) + (X2 - X1)) * 2))
<a name="l00402"></a>00402                     <span class="keywordflow">return</span> <span class="keyword">true</span>;
<a name="l00403"></a>00403             }
<a name="l00404"></a>00404 
<a name="l00405"></a>00405             <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00406"></a>00406         }
<a name="l00407"></a>00407     }
<a name="l00408"></a>00408 }
<a name="l00409"></a>00409 
</pre></div></div>
</div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&nbsp;</span>Указатель</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&nbsp;</span>Классы</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&nbsp;</span>Пространства имен</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&nbsp;</span>Файлы</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&nbsp;</span>Функции</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&nbsp;</span>Переменные</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&nbsp;</span>Перечисления</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&nbsp;</span>Свойства</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&nbsp;</span>События</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<hr class="footer"/><address class="footer"><small>Создано системой&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>
